import { ref } from 'vue'
import { defineStore } from 'pinia'

export const Set_User_List_Store = defineStore('user_list', () => {
  const user_list_info = ref({
    id: '',
    avatar: '',
    email: '',
    gender: '',
    is_active: true,
    nick_name: '',
    phone: '',
    role: [],
    username:''
  })

  const set_user_list_info = (id,avatar,email,gender,is_active,nick_name,phone,role,username) => {
    user_list_info.value.id = id
    user_list_info.value.avatar = avatar,
    user_list_info.value.email = email,
    user_list_info.value.gender = gender,
    user_list_info.value.is_active = is_active,
    user_list_info.value.nick_name = nick_name,
    user_list_info.value.phone = phone,
    user_list_info.value.role = role,
    user_list_info.value.username = username
    console.log("pinia中的数据:::",user_list_info.value)
  }

  return {
    user_list_info,
    set_user_list_info
     }
}
)
